﻿Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Data
Imports System.Collections
Imports System.Windows.Forms
Imports DataObject
Imports DataObject.hDBase

Public Class BusTinhTrangHopDong

    Private TinhTrangHopDongDAO As New SqlServerTinhTrangHopDong
    Private oTable As New DataTable

    Public Function GetAllTinhTrangHopDong(ByVal sStringConnection As String) As Object
        Try
            oTable = TinhTrangHopDongDAO.GetAllTinhTrangHopDong(sStringConnection)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
        Return oTable
    End Function

    Public Sub InsertTinhTrangHopDong(ByVal sStringConnection As String, ByVal oTinhTrangHopDong As TinhTrangHopDong)
        Try
            TinhTrangHopDongDAO.InsertTinhTrangHopDong(sStringConnection, oTinhTrangHopDong)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Public Sub UpdateTinhTrangHopDong(ByVal sStringConnection As String, ByVal oTinhTrangHopDong As TinhTrangHopDong)
        Dim bool_ As Boolean = True
        Try
            TinhTrangHopDongDAO.UpdateTinhTrangHopDong(sStringConnection, oTinhTrangHopDong)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Public Sub DeleteTinhTrangHopDong(ByVal sStringConnection As String, ByVal oTinhTrangHopDong As TinhTrangHopDong)
        Try
            TinhTrangHopDongDAO.DeleteTinhTrangHopDong(sStringConnection, oTinhTrangHopDong.SoTinhTrangHopDong)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

End Class
